#ifndef _CAPP_H_
#define _CAPP_H_
 
#include <SDL.h>

#include "CEvent.h"

enum {
    GRID_TYPE_NONE = 0,
    GRID_TYPE_X,
    GRID_TYPE_O
};

class CApp:public CEvent
{
public:
	CApp();
	int OnExecute();

	bool OnInit();

	void OnEvent(SDL_Event* Event);

	void OnLoop();

	void OnRender();

	void OnCleanup();

	void OnExit();

	void Reset();

	void SetCell(int ID, int Type);

	void OnLButtonDown(int mX, int mY);

 private:
 	bool Running;
 	SDL_Window* Surf_Display;

	SDL_Surface* Surf_Display_Test;

 	SDL_Surface* Surf_Grid;
 	SDL_Surface* Surf_X;
 	SDL_Surface* Surf_O;


 	SDL_Renderer* Renderer;
 	SDL_Texture* Texture;

 	int Grid[9];
 	int CurrentPlayer;
};
 
#endif